﻿@model IEnumerable<MvcMusicStore.Song>
@{Layout = "~/Views/Shared/_LayoutForAdmin.cshtml";}
@{
    ViewBag.Title = "Index";
}
<div id="songind" style="clear:left">
<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Title
        </th>
        <th>
            Year
        </th>
       @* <th>
            Add date
        </th>*@
        <th>
            Prise
        </th>
       <th>
            Genre
        </th>
        <th>
            Author
        </th>
        <th>
            Album
        </th>
        <th>
            Bought time
        </th>
        <th></th>
       
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.titleSong)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.yearSong)
        </td>
       @* <td>
            @Html.DisplayFor(modelItem => item.dateAdd)
        </td>*@
        <td>
            @Html.DisplayFor(modelItem => item.costSong)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Genre.nameGenre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Author.nameAuthor)
        </td>
        
        <td>
            @Html.DisplayFor(modelItem => item.Album.titleAlbum)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.counterBought)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
            @Html.ActionLink("Details", "Details", new { id = item.id }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.id })
        </td>
    </tr>
}

</table>
</div>
